/*
 * @Author: your name
 * @Date: 2021-04-12 00:21:10
 * @LastEditTime: 2021-11-29 17:47:34
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /fun_android/lib/ui/widget/activity_indicator.dart
 */
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/// 由于app不管明暗模式,都是有底色
/// 所以将indicator颜色为亮色
class ActivityIndicator extends StatelessWidget {
  final double radius;
  final Brightness? brightness;

  ActivityIndicator({required this.radius, this.brightness});

  @override
  Widget build(BuildContext context) {
    return Theme(
      data: ThemeData(
        cupertinoOverrideTheme: CupertinoThemeData(brightness: brightness),
      ),
      child: CupertinoActivityIndicator(radius: radius),
    );
  }
}
